package com.bitejiuyeke.bitemstemplateservice.rabbitmq;


import com.bitejiuyeke.bitemstemplateservice.domain.MessageDTO;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Consumer {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    @RabbitListener(queues = "testQueue")
    public void listenQueue(MessageDTO messageDTO){
        System.out.println("messageDTO : "+messageDTO);
        System.out.println(MessageDTO.class);


    }


}
